package com.liser.southernstar.net.model;

/**
 * 提供的默认的标注返回api
 *
 * @author xuexiang
 * @since 2018/5/22 下午4:22
 */
public class AppRestful<T> {

    private int code = 0;
    private String msg = "";
    private T data;

    public AppRestful() {
    }

    public int getCode() {
        return code;
    }

    public AppRestful<T> setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public AppRestful<T> setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public T getData() {
        return data;
    }

    public AppRestful<T> setData(T data) {
        this.data = data;
        return this;
    }

    public AppRestful setError(int code, String msg) {
        this.code = code;
        this.msg = msg;
        return this;
    }
}
